import { lazy } from 'react'
import { Modal } from '@/desktop/components'
import { Suspense } from '@/desktop/components/Loading'
import './index.module.less'

const Content = lazy(async () => import('./Content'))

export { ReactComponent as Icon } from './icon.svg'

export function SendMoment({ open, onClose }: { open: boolean; onClose: () => void }) {
  return <Modal
    styleName="modal"
    title="发送朋友圈"
    footer={null}
    width="800px"
    open={open}
    onCancel={onClose}
  >
    {open ? (
      <Suspense>
        <Content />
      </Suspense>
    ) : null}
  </Modal>
}
